/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package chain;

/**
 *
 * @author Emmanuel
 */
public class ClienteChain {
    
    public static void main(String[] args) {
        // Setup Chain of Responsibility
		Manejador h1 = new ManejadorConcreto1();
		Manejador h2 = new ManejadorConcreto2();
		Manejador h3 = new ManejadorConcreto3();
		h1.setSucesor(h2);
		h2.setSucesor(h3);

		// Send requests to the chain
		h1.manejarPeticion(new Peticion("Negative Value ", -1));
		h1.manejarPeticion(new Peticion("Negative Value ",  0));
		h1.manejarPeticion(new Peticion("Negative Value ",  1));
		h1.manejarPeticion(new Peticion("Negative Value ",  2));
		h1.manejarPeticion(new Peticion("Negative Value ", -5));	
        
        
    }
    
}
